/**
* <p>Title: BaseEntity.java</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2019</p>
* <p>Company: http://www.bjxjzd.com/</p>
*
*/  
package com.liupei.base.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

import javax.persistence.Transient;
import java.io.Serializable;

/**  
 * All rights Reserved, Designed By www.bjxjzd.com
 * @Title:  BaseEntity.java   
 * @Package com.jhxx.base.entity   
 * @Description:    TODO(用一句话描述该文件做什么)   
 * @author: 北京行进知达教育科技有限公司    
 * @date:   2019年11月14日 下午4:02:21   
 * @version V1.0 
 * @Copyright: 2019 www.bjxjzd.com Inc. All rights reserved. 
 */
public class BaseEntity implements Serializable{

	/**
	 * 每页显示几条
	 */
	public static final int PAGE_SIZE  = 10;

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Transient
	private int pageNum;
	@Transient
	private int pageSize;
	@Transient
	private Long userLongId;

	@JsonIgnore
	public int getPageNum() {
		if(pageNum == 0) {
			pageNum = 1;
		}
		return pageNum;
	}
	@JsonProperty
	public void setPageNum(int pageNum) {
		this.pageNum = pageNum;
	}
	@JsonIgnore
	public int getPageSize() {
		if(pageSize == 0) {
			pageSize = PAGE_SIZE;
		}
		return pageSize;
	}
	@JsonProperty
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	public Long getUserLongId() {
		return userLongId;
	}

	public void setUserLongId(Long userLongId) {
		this.userLongId = userLongId;
	}
}
